package day07;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;

public class Demo09 {

	public static void main(String[] args) throws Exception {
		String file = "abc/abc.txt";
		FileInputStream input = new FileInputStream(file);
		BufferedInputStream in = new BufferedInputStream(input);

		FileOutputStream output= new FileOutputStream("abc/abc1.txt");
		BufferedOutputStream out = new BufferedOutputStream(output);

		byte[] buf = new byte[1024];
		int n;
		while ((n = in.read(buf)) != -1) {

			out.write(buf, 0, n);

		}

		in.close();
		out.close();

		System.out.println("成功");

	}

}
